﻿
namespace Math2DStruct
{
    //直线的定义;
    public struct Line
    {
        public XVector2 startPoint;
        public XVector2 direction;

        public Line(XVector2 point, XVector2 dir)
        {
            startPoint = point;
            if (dir != XVector2.zero)
                direction = dir.normalized;
            else
                direction = XVector2.right;
        }
    }
}
